Skip to content

T1306840 - DataGrid - TagBox in the filter row doesn't show selected tags if values are numbers#33080

Merged
Raushen merged 9 commits intoDevExpress:26_1from
Raushen:T1306840-26_1
Apr 6, 2026
Merged

T1306840 - DataGrid - TagBox in the filter row doesn't show selected tags if values are numbers#33080
Raushen merged 9 commits intoDevExpress:26_1from
Raushen:T1306840-26_1

Conversation

@Raushen
Copy link
Copy Markdown
Contributor

@Raushen Raushen commented Mar 27, 2026

No description provided.

@Raushen Raushen self-assigned this Mar 27, 2026
@Raushen Raushen requested a review from a team as a code owner March 27, 2026 17:12
Copilot AI review requested due to automatic review settings March 27, 2026 17:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a DataGrid FilterRow scenario where a dxTagBox editor does not render selected tags when the underlying lookup values are numeric, by ensuring array filter values aren’t incorrectly discarded for number columns. Adds an integration test and supporting test models to cover the regression.

Changes:

  • Adjust FilterRow editor value resolution to allow array filterValue for non-between operations (enables TagBox multi-select values for numeric lookup columns).
  • Add a Jest integration test reproducing T1306840.
  • Extend grid test models to access the filter row/cell and introduce a TagBox testing model.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/devextreme/js/__internal/ui/tests/mock/model/tag_box.ts Adds a TagBox test model to set/get value and inspect rendered tags.
packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts Fixes getFilterValue to stop nulling array values for numeric columns outside between.
packages/devextreme/js/__internal/grids/grid_core/filter/tests/m_filter_row.integration.test.ts Adds regression coverage for TagBox in FilterRow with numeric lookup values.
packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/row/group_row.ts Refactors to reuse BaseRowModel.
packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/row/filter_row.ts Adds FilterRow model for accessing filter cells.
packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/row/data_row.ts Refactors to reuse BaseRowModel.
packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/row/base_row.ts Introduces shared row model utilities (element/cell access).
packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/grid_core.ts Adds getFilterRow() to the grid test model.
packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/cell/filter_cell.ts Adds FilterCell model to access editor widgets from filter cells.

Copilot AI review requested due to automatic review settings March 31, 2026 07:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

return false;
const hasMultiselectEditor = function ($editorContainer): boolean {
const editor = getEditorInstance($editorContainer);
// @ts-expect-error
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change import Editor to import Editor from '@ts/ui/editor/editor';
internal types contain NAME property, and it would be possible to remove @ts-expect-error

return !editor || MULTISELECT_EDITOR_NAMES.includes(editor.NAME);
};

const isValidFilterValue = function (filterValue, column, $editorContainer): boolean {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add types to arguments, please

…T1306840-26_1

# Conflicts:
#	packages/devextreme/js/__internal/grids/grid_core/__tests__/__mock__/model/grid_core.ts
Copilot AI review requested due to automatic review settings April 6, 2026 10:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment on lines +9 to +13
return this.root?.querySelectorAll('td') as NodeListOf<HTMLElement>;
}

public getCell(columnIndex: number): HTMLElement | null {
return this.getCells()?.[columnIndex] ?? null;
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getCells() is typed to always return NodeListOf<HTMLElement>, but it can return undefined at runtime when root is null (because of optional chaining + type cast). This makes the public API of the mock model unsound and can cause runtime errors if a test calls getCells().length/iterates without null checks. Consider either (a) making getCells() return NodeListOf<HTMLElement> | undefined/null, or (b) returning an actual NodeList/empty collection and removing the cast/optional chaining (fail fast like GroupRowModel.getCells() does).

Suggested change
return this.root?.querySelectorAll('td') as NodeListOf<HTMLElement>;
}
public getCell(columnIndex: number): HTMLElement | null {
return this.getCells()?.[columnIndex] ?? null;
if (this.root === null) {
return document.createElement('tr').querySelectorAll<HTMLElement>('td');
}
return this.root.querySelectorAll<HTMLElement>('td');
}
public getCell(columnIndex: number): HTMLElement | null {
return this.getCells()[columnIndex] ?? null;

Copilot uses AI. Check for mistakes.
@Raushen Raushen merged commit 7fc0418 into DevExpress:26_1 Apr 6, 2026
103 checks passed
Raushen added a commit to Raushen/DevExtreme that referenced this pull request Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants